using UnityEngine;

namespace Render
{
    public static class Materials
    {
        public static void SetFloat(string propertyName, float value, Material material)
        {
            if (material.HasProperty(propertyName))
                material.SetFloat(propertyName, value);
        }

        public static void SetVector(string propertyName, Vector4 value, Material material)
        {
            if (material.HasProperty(propertyName))
                material.SetVector(propertyName, value);
        }

        public static void SetTexture(string propertyName, Texture2D texture, Material material)
        {
            if (material.HasProperty(propertyName))
                material.SetTexture(propertyName, texture);
        }
    }
}